package com.health.db.model;

import java.util.ArrayList;
import java.util.List;

public class ZDocSortListExt extends ZDocSortList  {
    /**
	 * 
	 */
	private static final long serialVersionUID = -8633801263499018518L;

	protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public ZDocSortListExt() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andRecidIsNull() {
            addCriterion("RecID is null");
            return (Criteria) this;
        }

        public Criteria andRecidIsNotNull() {
            addCriterion("RecID is not null");
            return (Criteria) this;
        }

        public Criteria andRecidEqualTo(Integer value) {
            addCriterion("RecID =", value, "recid");
            return (Criteria) this;
        }

        public Criteria andRecidNotEqualTo(Integer value) {
            addCriterion("RecID <>", value, "recid");
            return (Criteria) this;
        }

        public Criteria andRecidGreaterThan(Integer value) {
            addCriterion("RecID >", value, "recid");
            return (Criteria) this;
        }

        public Criteria andRecidGreaterThanOrEqualTo(Integer value) {
            addCriterion("RecID >=", value, "recid");
            return (Criteria) this;
        }

        public Criteria andRecidLessThan(Integer value) {
            addCriterion("RecID <", value, "recid");
            return (Criteria) this;
        }

        public Criteria andRecidLessThanOrEqualTo(Integer value) {
            addCriterion("RecID <=", value, "recid");
            return (Criteria) this;
        }

        public Criteria andRecidIn(List<Integer> values) {
            addCriterion("RecID in", values, "recid");
            return (Criteria) this;
        }

        public Criteria andRecidNotIn(List<Integer> values) {
            addCriterion("RecID not in", values, "recid");
            return (Criteria) this;
        }

        public Criteria andRecidBetween(Integer value1, Integer value2) {
            addCriterion("RecID between", value1, value2, "recid");
            return (Criteria) this;
        }

        public Criteria andRecidNotBetween(Integer value1, Integer value2) {
            addCriterion("RecID not between", value1, value2, "recid");
            return (Criteria) this;
        }

        public Criteria andMasteridIsNull() {
            addCriterion("MasterID is null");
            return (Criteria) this;
        }

        public Criteria andMasteridIsNotNull() {
            addCriterion("MasterID is not null");
            return (Criteria) this;
        }

        public Criteria andMasteridEqualTo(Integer value) {
            addCriterion("MasterID =", value, "masterid");
            return (Criteria) this;
        }

        public Criteria andMasteridNotEqualTo(Integer value) {
            addCriterion("MasterID <>", value, "masterid");
            return (Criteria) this;
        }

        public Criteria andMasteridGreaterThan(Integer value) {
            addCriterion("MasterID >", value, "masterid");
            return (Criteria) this;
        }

        public Criteria andMasteridGreaterThanOrEqualTo(Integer value) {
            addCriterion("MasterID >=", value, "masterid");
            return (Criteria) this;
        }

        public Criteria andMasteridLessThan(Integer value) {
            addCriterion("MasterID <", value, "masterid");
            return (Criteria) this;
        }

        public Criteria andMasteridLessThanOrEqualTo(Integer value) {
            addCriterion("MasterID <=", value, "masterid");
            return (Criteria) this;
        }

        public Criteria andMasteridIn(List<Integer> values) {
            addCriterion("MasterID in", values, "masterid");
            return (Criteria) this;
        }

        public Criteria andMasteridNotIn(List<Integer> values) {
            addCriterion("MasterID not in", values, "masterid");
            return (Criteria) this;
        }

        public Criteria andMasteridBetween(Integer value1, Integer value2) {
            addCriterion("MasterID between", value1, value2, "masterid");
            return (Criteria) this;
        }

        public Criteria andMasteridNotBetween(Integer value1, Integer value2) {
            addCriterion("MasterID not between", value1, value2, "masterid");
            return (Criteria) this;
        }

        public Criteria andSortidIsNull() {
            addCriterion("SortID is null");
            return (Criteria) this;
        }

        public Criteria andSortidIsNotNull() {
            addCriterion("SortID is not null");
            return (Criteria) this;
        }

        public Criteria andSortidEqualTo(Integer value) {
            addCriterion("SortID =", value, "sortid");
            return (Criteria) this;
        }

        public Criteria andSortidNotEqualTo(Integer value) {
            addCriterion("SortID <>", value, "sortid");
            return (Criteria) this;
        }

        public Criteria andSortidGreaterThan(Integer value) {
            addCriterion("SortID >", value, "sortid");
            return (Criteria) this;
        }

        public Criteria andSortidGreaterThanOrEqualTo(Integer value) {
            addCriterion("SortID >=", value, "sortid");
            return (Criteria) this;
        }

        public Criteria andSortidLessThan(Integer value) {
            addCriterion("SortID <", value, "sortid");
            return (Criteria) this;
        }

        public Criteria andSortidLessThanOrEqualTo(Integer value) {
            addCriterion("SortID <=", value, "sortid");
            return (Criteria) this;
        }

        public Criteria andSortidIn(List<Integer> values) {
            addCriterion("SortID in", values, "sortid");
            return (Criteria) this;
        }

        public Criteria andSortidNotIn(List<Integer> values) {
            addCriterion("SortID not in", values, "sortid");
            return (Criteria) this;
        }

        public Criteria andSortidBetween(Integer value1, Integer value2) {
            addCriterion("SortID between", value1, value2, "sortid");
            return (Criteria) this;
        }

        public Criteria andSortidNotBetween(Integer value1, Integer value2) {
            addCriterion("SortID not between", value1, value2, "sortid");
            return (Criteria) this;
        }

        public Criteria andSortTypeIsNull() {
            addCriterion("Sort_TYPE is null");
            return (Criteria) this;
        }

        public Criteria andSortTypeIsNotNull() {
            addCriterion("Sort_TYPE is not null");
            return (Criteria) this;
        }

        public Criteria andSortTypeEqualTo(Short value) {
            addCriterion("Sort_TYPE =", value, "sortType");
            return (Criteria) this;
        }

        public Criteria andSortTypeNotEqualTo(Short value) {
            addCriterion("Sort_TYPE <>", value, "sortType");
            return (Criteria) this;
        }

        public Criteria andSortTypeGreaterThan(Short value) {
            addCriterion("Sort_TYPE >", value, "sortType");
            return (Criteria) this;
        }

        public Criteria andSortTypeGreaterThanOrEqualTo(Short value) {
            addCriterion("Sort_TYPE >=", value, "sortType");
            return (Criteria) this;
        }

        public Criteria andSortTypeLessThan(Short value) {
            addCriterion("Sort_TYPE <", value, "sortType");
            return (Criteria) this;
        }

        public Criteria andSortTypeLessThanOrEqualTo(Short value) {
            addCriterion("Sort_TYPE <=", value, "sortType");
            return (Criteria) this;
        }

        public Criteria andSortTypeIn(List<Short> values) {
            addCriterion("Sort_TYPE in", values, "sortType");
            return (Criteria) this;
        }

        public Criteria andSortTypeNotIn(List<Short> values) {
            addCriterion("Sort_TYPE not in", values, "sortType");
            return (Criteria) this;
        }

        public Criteria andSortTypeBetween(Short value1, Short value2) {
            addCriterion("Sort_TYPE between", value1, value2, "sortType");
            return (Criteria) this;
        }

        public Criteria andSortTypeNotBetween(Short value1, Short value2) {
            addCriterion("Sort_TYPE not between", value1, value2, "sortType");
            return (Criteria) this;
        }

        public Criteria andSortNameIsNull() {
            addCriterion("Sort_NAME is null");
            return (Criteria) this;
        }

        public Criteria andSortNameIsNotNull() {
            addCriterion("Sort_NAME is not null");
            return (Criteria) this;
        }

        public Criteria andSortNameEqualTo(String value) {
            addCriterion("Sort_NAME =", value, "sortName");
            return (Criteria) this;
        }

        public Criteria andSortNameNotEqualTo(String value) {
            addCriterion("Sort_NAME <>", value, "sortName");
            return (Criteria) this;
        }

        public Criteria andSortNameGreaterThan(String value) {
            addCriterion("Sort_NAME >", value, "sortName");
            return (Criteria) this;
        }

        public Criteria andSortNameGreaterThanOrEqualTo(String value) {
            addCriterion("Sort_NAME >=", value, "sortName");
            return (Criteria) this;
        }

        public Criteria andSortNameLessThan(String value) {
            addCriterion("Sort_NAME <", value, "sortName");
            return (Criteria) this;
        }

        public Criteria andSortNameLessThanOrEqualTo(String value) {
            addCriterion("Sort_NAME <=", value, "sortName");
            return (Criteria) this;
        }

        public Criteria andSortNameLike(String value) {
            addCriterion("Sort_NAME like", value, "sortName");
            return (Criteria) this;
        }

        public Criteria andSortNameNotLike(String value) {
            addCriterion("Sort_NAME not like", value, "sortName");
            return (Criteria) this;
        }

        public Criteria andSortNameIn(List<String> values) {
            addCriterion("Sort_NAME in", values, "sortName");
            return (Criteria) this;
        }

        public Criteria andSortNameNotIn(List<String> values) {
            addCriterion("Sort_NAME not in", values, "sortName");
            return (Criteria) this;
        }

        public Criteria andSortNameBetween(String value1, String value2) {
            addCriterion("Sort_NAME between", value1, value2, "sortName");
            return (Criteria) this;
        }

        public Criteria andSortNameNotBetween(String value1, String value2) {
            addCriterion("Sort_NAME not between", value1, value2, "sortName");
            return (Criteria) this;
        }

        public Criteria andSortOrderIsNull() {
            addCriterion("Sort_Order is null");
            return (Criteria) this;
        }

        public Criteria andSortOrderIsNotNull() {
            addCriterion("Sort_Order is not null");
            return (Criteria) this;
        }

        public Criteria andSortOrderEqualTo(Short value) {
            addCriterion("Sort_Order =", value, "sortOrder");
            return (Criteria) this;
        }

        public Criteria andSortOrderNotEqualTo(Short value) {
            addCriterion("Sort_Order <>", value, "sortOrder");
            return (Criteria) this;
        }

        public Criteria andSortOrderGreaterThan(Short value) {
            addCriterion("Sort_Order >", value, "sortOrder");
            return (Criteria) this;
        }

        public Criteria andSortOrderGreaterThanOrEqualTo(Short value) {
            addCriterion("Sort_Order >=", value, "sortOrder");
            return (Criteria) this;
        }

        public Criteria andSortOrderLessThan(Short value) {
            addCriterion("Sort_Order <", value, "sortOrder");
            return (Criteria) this;
        }

        public Criteria andSortOrderLessThanOrEqualTo(Short value) {
            addCriterion("Sort_Order <=", value, "sortOrder");
            return (Criteria) this;
        }

        public Criteria andSortOrderIn(List<Short> values) {
            addCriterion("Sort_Order in", values, "sortOrder");
            return (Criteria) this;
        }

        public Criteria andSortOrderNotIn(List<Short> values) {
            addCriterion("Sort_Order not in", values, "sortOrder");
            return (Criteria) this;
        }

        public Criteria andSortOrderBetween(Short value1, Short value2) {
            addCriterion("Sort_Order between", value1, value2, "sortOrder");
            return (Criteria) this;
        }

        public Criteria andSortOrderNotBetween(Short value1, Short value2) {
            addCriterion("Sort_Order not between", value1, value2, "sortOrder");
            return (Criteria) this;
        }

        public Criteria andSortUrlIsNull() {
            addCriterion("Sort_URL is null");
            return (Criteria) this;
        }

        public Criteria andSortUrlIsNotNull() {
            addCriterion("Sort_URL is not null");
            return (Criteria) this;
        }

        public Criteria andSortUrlEqualTo(String value) {
            addCriterion("Sort_URL =", value, "sortUrl");
            return (Criteria) this;
        }

        public Criteria andSortUrlNotEqualTo(String value) {
            addCriterion("Sort_URL <>", value, "sortUrl");
            return (Criteria) this;
        }

        public Criteria andSortUrlGreaterThan(String value) {
            addCriterion("Sort_URL >", value, "sortUrl");
            return (Criteria) this;
        }

        public Criteria andSortUrlGreaterThanOrEqualTo(String value) {
            addCriterion("Sort_URL >=", value, "sortUrl");
            return (Criteria) this;
        }

        public Criteria andSortUrlLessThan(String value) {
            addCriterion("Sort_URL <", value, "sortUrl");
            return (Criteria) this;
        }

        public Criteria andSortUrlLessThanOrEqualTo(String value) {
            addCriterion("Sort_URL <=", value, "sortUrl");
            return (Criteria) this;
        }

        public Criteria andSortUrlLike(String value) {
            addCriterion("Sort_URL like", value, "sortUrl");
            return (Criteria) this;
        }

        public Criteria andSortUrlNotLike(String value) {
            addCriterion("Sort_URL not like", value, "sortUrl");
            return (Criteria) this;
        }

        public Criteria andSortUrlIn(List<String> values) {
            addCriterion("Sort_URL in", values, "sortUrl");
            return (Criteria) this;
        }

        public Criteria andSortUrlNotIn(List<String> values) {
            addCriterion("Sort_URL not in", values, "sortUrl");
            return (Criteria) this;
        }

        public Criteria andSortUrlBetween(String value1, String value2) {
            addCriterion("Sort_URL between", value1, value2, "sortUrl");
            return (Criteria) this;
        }

        public Criteria andSortUrlNotBetween(String value1, String value2) {
            addCriterion("Sort_URL not between", value1, value2, "sortUrl");
            return (Criteria) this;
        }

        public Criteria andIsUsedFlagIsNull() {
            addCriterion("is_Used_FLAG is null");
            return (Criteria) this;
        }

        public Criteria andIsUsedFlagIsNotNull() {
            addCriterion("is_Used_FLAG is not null");
            return (Criteria) this;
        }

        public Criteria andIsUsedFlagEqualTo(Short value) {
            addCriterion("is_Used_FLAG =", value, "isUsedFlag");
            return (Criteria) this;
        }

        public Criteria andIsUsedFlagNotEqualTo(Short value) {
            addCriterion("is_Used_FLAG <>", value, "isUsedFlag");
            return (Criteria) this;
        }

        public Criteria andIsUsedFlagGreaterThan(Short value) {
            addCriterion("is_Used_FLAG >", value, "isUsedFlag");
            return (Criteria) this;
        }

        public Criteria andIsUsedFlagGreaterThanOrEqualTo(Short value) {
            addCriterion("is_Used_FLAG >=", value, "isUsedFlag");
            return (Criteria) this;
        }

        public Criteria andIsUsedFlagLessThan(Short value) {
            addCriterion("is_Used_FLAG <", value, "isUsedFlag");
            return (Criteria) this;
        }

        public Criteria andIsUsedFlagLessThanOrEqualTo(Short value) {
            addCriterion("is_Used_FLAG <=", value, "isUsedFlag");
            return (Criteria) this;
        }

        public Criteria andIsUsedFlagIn(List<Short> values) {
            addCriterion("is_Used_FLAG in", values, "isUsedFlag");
            return (Criteria) this;
        }

        public Criteria andIsUsedFlagNotIn(List<Short> values) {
            addCriterion("is_Used_FLAG not in", values, "isUsedFlag");
            return (Criteria) this;
        }

        public Criteria andIsUsedFlagBetween(Short value1, Short value2) {
            addCriterion("is_Used_FLAG between", value1, value2, "isUsedFlag");
            return (Criteria) this;
        }

        public Criteria andIsUsedFlagNotBetween(Short value1, Short value2) {
            addCriterion("is_Used_FLAG not between", value1, value2, "isUsedFlag");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}